<?php
include_once 'function.php';

$bits = getParam("bits");
$binary = null;
//$bits += $bit_check[$bits];

while($bits > 0) {
    $binary .= rand(0, 1);
    $bits--;
}
//$binary = '00111001';
echo json_encode(array('binary' => $binary));